3.328 \(\int \cot (c+d x) (a+b \tan (c+d x))^{3/2} (A+B \tan (c+d x)) \, dx\)

Optimal. Leaf size=152 \[ -\frac{2 a^{3/2} A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{d}+\frac{(a-i b)^{3/2} (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d}+\frac{(a+i b)^{3/2} (A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d}+\frac{2 b B \sqrt{a+b \tan (c+d x)}}{d} \]

[Out]

(-2*a^(3/2)*A*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a]])/d + ((a - I*b)^(3/2)*(A - I*B)*ArcTanh[Sqrt[a + b*Tan
[c + d*x]]/Sqrt[a - I*b]])/d + ((a + I*b)^(3/2)*(A + I*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]])/d +
 (2*b*B*Sqrt[a + b*Tan[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.639844, antiderivative size = 152, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 7, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.226, Rules used = {3607, 3653, 3539, 3537, 63, 208, 3634} \[ -\frac{2 a^{3/2} A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{d}+\frac{(a-i b)^{3/2} (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d}+\frac{(a+i b)^{3/2} (A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d}+\frac{2 b B \sqrt{a+b \tan (c+d x)}}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*(a + b*Tan[c + d*x])^(3/2)*(A + B*Tan[c + d*x]),x]

[Out]

(-2*a^(3/2)*A*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a]])/d + ((a - I*b)^(3/2)*(A - I*B)*ArcTanh[Sqrt[a + b*Tan
[c + d*x]]/Sqrt[a - I*b]])/d + ((a + I*b)^(3/2)*(A + I*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]])/d +
 (2*b*B*Sqrt[a + b*Tan[c + d*x]])/d

Rule 3607

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*B*(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^(n + 1))/(d*
f*(m + n)), x] + Dist[1/(d*(m + n)), Int[(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^n*Simp[a^2*A*d*(m +
 n) - b*B*(b*c*(m - 1) + a*d*(n + 1)) + d*(m + n)*(2*a*A*b + B*(a^2 - b^2))*Tan[e + f*x] - (b*B*(b*c - a*d)*(m
 - 1) - b*(A*b + a*B)*d*(m + n))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*
c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 1] && (IntegerQ[m] || IntegersQ[2*m, 2*n]) &&
 !(IGtQ[n, 1] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])))

Rule 3653

Int[(((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2))/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/(a^2 + b^2), Int[(c + d*Tan[e + f*
x])^n*Simp[b*B + a*(A - C) + (a*B - b*(A - C))*Tan[e + f*x], x], x], x] + Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 +
b^2), Int[((c + d*Tan[e + f*x])^n*(1 + Tan[e + f*x]^2))/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e,
f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !GtQ[n, 0] &&  !LeQ[n, -
1]

Rule 3539

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3537

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c*
d)/f, Subst[Int[(a + (b*x)/d)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 3634

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_) + (C_.)*
tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[A/f, Subst[Int[(a + b*x)^m*(c + d*x)^n, x], x, Tan[e + f*x]], x]
 /; FreeQ[{a, b, c, d, e, f, A, C, m, n}, x] && EqQ[A, C]

Rubi steps

\begin{align*} \int \cot (c+d x) (a+b \tan (c+d x))^{3/2} (A+B \tan (c+d x)) \, dx &=\frac{2 b B \sqrt{a+b \tan (c+d x)}}{d}+2 \int \frac{\cot (c+d x) \left (\frac{a^2 A}{2}+\frac{1}{2} \left (2 a A b+a^2 B-b^2 B\right ) \tan (c+d x)+\frac{1}{2} b (A b+2 a B) \tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx\\ &=\frac{2 b B \sqrt{a+b \tan (c+d x)}}{d}+2 \int \frac{\frac{1}{2} \left (2 a A b+a^2 B-b^2 B\right )-\frac{1}{2} \left (a^2 A-A b^2-2 a b B\right ) \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx+\left (a^2 A\right ) \int \frac{\cot (c+d x) \left (1+\tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx\\ &=\frac{2 b B \sqrt{a+b \tan (c+d x)}}{d}-\frac{1}{2} \left ((a+i b)^2 (i A-B)\right ) \int \frac{1-i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx+\frac{1}{2} \left ((a-i b)^2 (i A+B)\right ) \int \frac{1+i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx+\frac{\left (a^2 A\right ) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{2 b B \sqrt{a+b \tan (c+d x)}}{d}+\frac{\left (2 a^2 A\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{b d}-\frac{\left ((a-i b)^2 (A-i B)\right ) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}-\frac{\left ((a+i b)^2 (A+i B)\right ) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d}\\ &=-\frac{2 a^{3/2} A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{d}+\frac{2 b B \sqrt{a+b \tan (c+d x)}}{d}+\frac{\left ((a+i b)^2 (i A-B)\right ) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i a}{b}-\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{b d}-\frac{\left ((a-i b)^2 (i A+B)\right ) \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i a}{b}+\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{b d}\\ &=-\frac{2 a^{3/2} A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{d}+\frac{(a-i b)^{3/2} (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d}+\frac{(a+i b)^{3/2} (A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d}+\frac{2 b B \sqrt{a+b \tan (c+d x)}}{d}\\ \end{align*}

Mathematica [A]  time = 0.334605, size = 144, normalized size = 0.95 \[ \frac{-2 a^{3/2} A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )+(a-i b)^{3/2} (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )+(a+i b)^{3/2} (A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )+2 b B \sqrt{a+b \tan (c+d x)}}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]*(a + b*Tan[c + d*x])^(3/2)*(A + B*Tan[c + d*x]),x]

[Out]

(-2*a^(3/2)*A*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a]] + (a - I*b)^(3/2)*(A - I*B)*ArcTanh[Sqrt[a + b*Tan[c +
 d*x]]/Sqrt[a - I*b]] + (a + I*b)^(3/2)*(A + I*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]] + 2*b*B*Sqrt
[a + b*Tan[c + d*x]])/d

________________________________________________________________________________________

Maple [C]  time = 1.837, size = 41721, normalized size = 274.5 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)*(a+b*tan(d*x+c))^(3/2)*(A+B*tan(d*x+c)),x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*tan(d*x+c))^(3/2)*(A+B*tan(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*tan(d*x+c))^(3/2)*(A+B*tan(d*x+c)),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (A + B \tan{\left (c + d x \right )}\right ) \left (a + b \tan{\left (c + d x \right )}\right )^{\frac{3}{2}} \cot{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*tan(d*x+c))**(3/2)*(A+B*tan(d*x+c)),x)

[Out]

Integral((A + B*tan(c + d*x))*(a + b*tan(c + d*x))**(3/2)*cot(c + d*x), x)

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*tan(d*x+c))^(3/2)*(A+B*tan(d*x+c)),x, algorithm="giac")

[Out]

Timed out